import request from "@/utils/request"

//查询仪器列表
export function getdeviceApplyList(params) {
    return request({
        url: `/device/deviceList`,
        method: 'get',
        params
    })
}
//新增
export function Addnewdevices(data) {
    return request({
        url: `/device/addDevice`,
        method: 'post',
        data
    })
}
//文件上传
export function fileUpload(data) {
    return request({
        url: `/deviceInstall/fileUpload`,
        method: 'post',
        data
    })
}
// 位置列表
export function roomList(query) {
    return request({
        url: '/room/roomList',
        method: 'get',
        params: query
    })
}

//修改
export function updateDevice(data) {
    return request({
        url: `/device/updateDevice`,
        method: 'post',
        data
    })
}


//仪器借出登记
export function Loanregistration(data) {
    return request({
        url: `/deviceBorrow/borrow`,
        method: "post",
        data
    })
}

//仪器授权使用人下拉接口
export function userList(params) {
    return request({
        url: `/device/userList`,
        method: 'get',
        params
    })
}

//设备详情
export function detail(params) {
    return request({
        url: `/device/detail`,
        method: 'get',
        params
    })
}

//部门下拉
export function selectDeptTrees(params) {
    return request({
        url: `/dept/selectDeptTrees`,
        method: 'get',
        params
    })
}

// 导出设备列表
export function exportDeviceExcel(query) {
    return request({
        url: '/excel/exportDeviceExcel',
        method: 'get',
        params: query
    })
}
//删除
export function deleteById(params) {
    return request({
        url: `/device/deleteById`,
        method: 'get',
        params
    })
}
//复制
export function copyDevice(params) {
    return request({
        url: `/device/copyDevice`,
        method: 'get',
        params
    })
}